export const query1 = {
  size: 0,
  aggs: {
    date_range: {
      range: {
        field: 'date',
        format: 'yyyy-MM',
        ranges: [
          {
            key: '<2018-01',
            to: '2018-01'
          },
          {
            key: '2018年1月-2月',
            to: '2018-02',
            from: '2018-01'
          },
          {
            key: '2018年2月-3月',
            to: '2018-03',
            from: '2018-02'
          },
          {
            key: '>2018-03',
            from: '2018-03'
          }
        ]
      }
    }
  }
};

export const query2 = {
  size: 0,
  aggs: {
    per_fans: {
      percentiles: {
        field: 'fans',
        percents: [1, 10, 25, 50, 75, 99]
      }
    }
  }
};
